--------------------------------------------------------
--  DDL for Trigger APEX_USER_QUERY_PK_TRG
--------------------------------------------------------

  CREATE OR REPLACE TRIGGER "APEX_USER_QUERY_PK_TRG" 
  BEFORE INSERT ON "APEX_USER_QUERY"
  REFERENCING FOR EACH ROW
  begin  
   if inserting then 
      if :NEW."AUQID" is null then 
         select APEX_QP_SEQ.nextval into :NEW."AUQID" from dual; 
      end if; 
   end if; 
end;
ALTER TRIGGER "APEX_USER_QUERY_PK_TRG" ENABLE
